package com.example.demo.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

//@Controller
@RestController
public class ControllerTest {

    @RequestMapping("test1")
//    @ResponseBody
    public String test(){
        System.out.println("123");
        return "suceess";
    }
    @RequestMapping("test2")
    public String test1(){
        return "suceess2";
    }

    @RequestMapping("test3")
    public String test2(
            @RequestParam("name") String na,
            @RequestParam("age") Integer a){
        System.out.println("111111111");
        return "name:"+na+" age:"+a;
    }
}
